Skip to content

Rollup of 21 pull requests#157582

Closed
JonathanBrouwer wants to merge 54 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-rMvUZdX
Closed

Rollup of 21 pull requests#157582
JonathanBrouwer wants to merge 54 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-rMvUZdX

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

Kmeakin and others added 30 commits May 4, 2026 00:11
We can shave a further 2 `icmp`s by inlining `is_char_boundary` and rearranging
the checks.
Add notes to the primitive integer and `NonZero` types clarifying the
equivalence between `highest_one` and the `ilog2`/`checked_ilog2`
methods for non-negative values.
- 调整 MaybeUninit::zeroed 文档中的 padding 字节说明

- 对齐 mem::zeroed 中不保证 padding 为零的表述
…ning

Make the linker quiet by default and add linker command line arguments
for explicit verbosity control:

- no flag: no tracing output is emitted during successful links
- `-v`: emit informational linker diagnostics
- `-vv`: emit tracing-level linker diagnostics

Also adjust the tracing formatter to produce linker-style output by disabling
ANSI color sequences and omitting timestamps, tracing levels, and tracing
targets.
* The documentation for `align_of_val()` and `Alignment::of_val()` did
  not explain its use in interacting with `dyn` types, and even
  contained the false statement that “Every reference to a value of the
  type `T` must be a multiple of this number”. This change removes that
  statement from everything except `align_of()`, and adds a mention
  of, and example code for, getting the alignment of a `dyn` value.

* The documentation for `align_of_val_raw()` did not explain how it
  relates to other functions in the family. Now it does.

* Added a caveat that the alignment of `i32` is not always 4, despite
  the examples asserting this.
Import resolution now happens in 2 phases:
1. We resolve all undetermined and collect their resolutions
2. Write all resolutions to the Resolver state.

Repeat this untill we reach a fix point.

+ Bless tests
… imports the correct traits for `aarch64`.

+ run the generator to apply change.
- take ownership of the `Vec<&Impl>` instead of copying into another alloc
- reuse `ImplString` to do natural sort ordering
- lazy formatting
…anBrouwer

Suggest using comma to separate valid attribute list items

If the parser encounters a missing comma in an attribute arg list and the next item is valid, suggest adding the comma.

For example:
```
error: attribute items not separated with `,`
  --> $DIR/expected-comma-found-token.rs:7:26
   |
LL |     message="the message"
   |                          ^ help: try adding `,` here
```
chore: Update annotate-snippets to 0.12.16

This PR updates `annotate-snippets` to [`0.12.16`](https://github.com/rust-lang/annotate-snippets-rs/blob/main/CHANGELOG.md#01216---2026-05-06) which fixes highlighting for indented code: rust-lang/annotate-snippets-rs#405

Also fixes rust-lang#155873 (the same problem)
…saethlin

In `copy_nonoverlapping`, use `mul nuw nsw` to compute the byte size

Seems like we might as well?  Adding these flags means the optimizer can tell the limited range on the count of items -- like how we use these flags (rust-lang#136575) when calculating `size_of_val` for a slice.

Today we use a wrapping multiplication, which mean that `copy_nonoverlapping::<u32>(src, dst, 0x40000000_00000001)` appears like 4 bytes -- a perfectly reasonable size! -- once it gets to the `memcpy` call.

If I'm understanding <https://doc.rust-lang.org/std/ptr/fn.copy_nonoverlapping.html#safety> properly, this is just exploiting existing UB, since `src` and `dst` must each be inside an allocation, and those allocations can be at most `isize::MAX` bytes.  (Plus, fundamentally, to be non-overlapping there's not enough space in the address space to be bigger than `isize::MAX`.)

cc @RalfJung to make sure this is ok, as requested last he found out I was newly exploiting some UB in codegen 🙃
r? codegen
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 7, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Jun 7, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-2

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 7, 2026

📌 Commit 43dc78c has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 7, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 7, 2026
Rollup of 21 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-2
@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 7, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 7, 2026

☔ The latest upstream changes (presumably #147250) made this pull request unmergeable. Please resolve the merge conflicts.

This pull request was unapproved.

@jhpratt jhpratt closed this Jun 7, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 7, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 7, 2026

☀️ Try build successful (CI)
Build commit: cce51fe (cce51feb8f2db2fc5a27e8058f083048b072a16d, parent: 43a4909ee98ed4d006d9d773f5d94dc58e34f846)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustdoc-json Area: Rustdoc JSON backend rollup A PR which is a rollup T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.